import {downloadFile} from "@/api/sysFileInfo/sysFileInfo"
import axios from "axios";

export function useTextContent(sysFile) {

    if (![5, 6, 9,11,12,13,4,14,15,16,17].includes(sysFile.fileType)) {
        return Promise.resolve("");
    }

   return  axios.get(  `${import.meta.env.VITE_APP_BASE_API}/file/download?path=${encodeURIComponent(sysFile.path)}`, {
        transformResponse: [data => data] // 禁用默认JSON解析
    })


}